// Small
.select2-container--bootstrap-5 .select2--small {
    // Layout
    &.select2-selection {
        min-height: $s2bs5-height-sm;
        padding: $s2bs5-padding-y-sm $s2bs5-padding-x-sm;
        @include font-size($s2bs5-font-size-sm);
    }

    &.select2-selection--single,
    &.select2-selection--multiple {
        .select2-selection__clear {
            width: $s2b25-clear-width-sm;
            height: $s2b25-clear-height-sm;
            padding: $s2bs5-clear-padding-y-sm $s2bs5-clear-padding-x-sm;
            background: $s2bs5-clear-bg-sm;

            &:hover {
                background: $s2bs5-clear-hover-bg-sm;
            }
        }
    }

    // Dropdown
    &.select2-dropdown {
        .select2-search {
            .select2-search__field {
                padding: $s2bs5-padding-y-sm $s2bs5-padding-x-sm;
                @include font-size($s2bs5-font-size-sm);
            }
        }

        .select2-results__options {
            .select2-results__option {
                padding: $s2bs5-item-padding-y-sm $s2bs5-item-padding-x-sm;
                @include font-size($s2bs5-font-size-sm);

                &[role="group"] {
                    .select2-results__group {
                        padding: $s2bs5-group-padding-y-sm $s2bs5-group-padding-x-sm;
                    }

                    .select2-results__options--nested {
                        .select2-results__option {
                            padding: $s2bs5-item-padding-y-sm $s2bs5-item-padding-x-sm;
                        }
                    }
                }
            }
        }
    }

    // Single
    &.select2-selection--single {
        padding: $s2bs5-padding-y-sm $s2bs5-indicator-padding $s2bs5-padding-y-sm $s2bs5-padding-x-sm;
    }

    // Multiple
    &.select2-selection--multiple {
        .select2-selection__rendered {
            &:not(:empty) {
                padding-bottom: $s2bs5-padding-y-sm;
            }

            .select2-selection__choice {
                padding: $s2bs5-multi-item-padding-y $s2bs5-multi-item-padding-x;
                @include font-size($s2bs5-font-size-sm);

                .select2-selection__choice__remove {
                    width: $s2b25-clear-width-sm;
                    height: $s2b25-clear-height-sm;
                    padding: $s2bs5-clear-padding-y-sm $s2bs5-clear-padding-x-sm;
                    background: $s2bs5-clear-bg-sm;

                    &:hover {
                        background: $s2bs5-clear-hover-bg-sm;
                    }
                }
            }
        }

        .select2-selection__clear {
            right: $s2bs5-padding-x-sm;
        }
    }
}

// Large
.select2-container--bootstrap-5 .select2--large {
    // Layout
    &.select2-selection {
        min-height: $s2bs5-height-lg;
        padding: $s2bs5-padding-y-lg $s2bs5-padding-x-lg;
        @include font-size($s2bs5-font-size-lg);
    }

    &.select2-selection--single,
    &.select2-selection--multiple {
        .select2-selection__clear {
            width: $s2b25-clear-width-lg;
            height: $s2b25-clear-height-lg;
            padding: $s2bs5-clear-padding-y-lg $s2bs5-clear-padding-x-lg;
            background: $s2bs5-clear-bg-lg;

            &:hover {
                background: $s2bs5-clear-hover-bg-lg;
            }
        }
    }

    // Dropdown
    &.select2-dropdown {
        .select2-search {
            .select2-search__field {
                padding: $s2bs5-padding-y-lg $s2bs5-padding-x-lg;
                @include font-size($s2bs5-font-size-lg);
            }
        }

        .select2-results__options {
            .select2-results__option {
                padding: $s2bs5-item-padding-y-lg $s2bs5-item-padding-x-lg;
                @include font-size($s2bs5-font-size-lg);

                &[role="group"] {
                    .select2-results__group {
                        padding: $s2bs5-group-padding-y-lg $s2bs5-group-padding-x-lg;
                    }

                    .select2-results__options--nested {
                        .select2-results__option {
                            padding: $s2bs5-item-padding-y-lg $s2bs5-item-padding-x-lg;
                        }
                    }
                }
            }
        }
    }

    // Single
    &.select2-selection--single {
        padding: $s2bs5-padding-y-lg $s2bs5-indicator-padding $s2bs5-padding-y-lg $s2bs5-padding-x-lg;
    }

    // Multiple
    &.select2-selection--multiple {
        .select2-selection__rendered {
            &:not(:empty) {
                padding-bottom: $s2bs5-padding-y-lg;
            }

            .select2-selection__choice {
                padding: $s2bs5-multi-item-padding-y $s2bs5-multi-item-padding-x;
                @include font-size($s2bs5-font-size-lg);

                .select2-selection__choice__remove {
                    width: $s2b25-clear-width-lg;
                    height: $s2b25-clear-height-lg;
                    padding: $s2bs5-clear-padding-y-lg $s2bs5-clear-padding-x-lg;
                    background: $s2bs5-clear-bg-lg;

                    &:hover {
                        background: $s2bs5-clear-hover-bg-lg;
                    }
                }
            }
        }

        .select2-selection__clear {
            right: $s2bs5-padding-x-lg;
        }
    }
}
